package com.test1225;

public class Test04 {
    public static void main(String[] args) {
        // 合并2个数组中的元素
        int[] arr = {1,2,3};
        int[] brr = {4,5,6};
        int[] crr = m04(arr, brr);
        for (int c:crr) {
            System.out.println(c);
        }
    }
    public static int[] m04(int[] a,int[] b){
        int [] newArr = new int[a.length+b.length];
        for(int i=0;i< a.length;i++){
            newArr[i]=a[i];
        }
        for(int j=0;j<b.length;j++){
            newArr[a.length+j] = b[j];
        }
        return newArr;
    }
}
